<template>
	<view class="search-result">
		<bsNavBar title='查询结果'></bsNavBar>
		<view class="yes" v-if="row">
			<image class="icon" :src="imgUrl+'duihao.png'" mode=""></image>
			<view class="title">
				您查询的获奖情况属实
			</view>
			<view class="content-text" style="margin-bottom:20rpx;">
				获奖证书
			</view>
			<u-image @click='handBigImg(row.imgUrl)' :fade="true" duration="450" width="100%" height="374rpx" :src="row.imgUrl"></u-image>
		</view>
		<view class="yes" v-else>
			<image class="icon" :src="imgUrl+'no-duihao.png'" mode=""></image>
			<view class="title">
				查询失败
			</view>
			<view class="content-text" style="margin-bottom:100rpx">
				未查询到您输入的姓名和证书编号
				请检查输入是否正确
			</view>
			<u-button type="jz" @click="handGoBack">重新查询</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgUrl: this.configImgUrl,
				row: false
			};
		},
		onLoad(e) {
			if (e.row) {
				this.row = JSON.parse(e.row)
			}
			console.log(this.row, '???????')
		},
		methods: {
			handGoBack() {
				uni.navigateBack({

				})
			},
			handBigImg(imgUrl) {
				uni.previewImage({
					current: 0,
					urls: [imgUrl]
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.search-result {
		padding: 120rpx 30rpx;
		text-align: center;

		.icon {
			width: 130rpx;
			height: 130rpx;

		}

		.title {
			font-size: 36rpx;
			color: #333333;
			margin-top: 40rpx;
			margin-bottom: 50rpx;
		}

		.content-text {
			font-size: 32rpx;
			color: #666666;
			margin-bottom: 20rpx;
			max-width: 508rpx;
			margin: 0 auto;
		}
	}
</style>
